package org.example.springbootpra1.demos.services.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.example.springbootpra1.demos.bean.ChargingPileWithPlotVO;
import org.example.springbootpra1.demos.mapper.ChargePileWithPlotMapper;
import org.example.springbootpra1.demos.services.service.ChargePileWithPlotService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ChargePileWithPlotServiceImpl extends ServiceImpl<ChargePileWithPlotMapper, ChargingPileWithPlotVO> implements ChargePileWithPlotService {

    @Autowired
    private ChargePileWithPlotMapper chargePileWithPlotMapper;

    @Override
    public IPage<ChargingPileWithPlotVO> getChargingPileWithPlotPage(){
        Page<ChargingPileWithPlotVO> page = new Page<>(1, 5);
        return chargePileWithPlotMapper.getPileWithPlotList(page, null);
    }


    @Override
    public IPage<ChargingPileWithPlotVO> getChargingPileWithPlotQueryPage(Page<ChargingPileWithPlotVO> page, QueryWrapper<ChargingPileWithPlotVO> queryWrapper){

//        return chargePileWithPlotMapper.getPileWithPlotList(page, queryWrapper);
        return baseMapper.getPileWithPlotList(page, queryWrapper);

    }


}
